{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "from sklearn import datasets"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "iris =  datasets.load_iris()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "X = iris.data\n",
    "y = iris.target"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "X = X[y < 2, :2]\n",
    "y = y[y < 2]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(100, 2)"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "X.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(100,)"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "y.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAD8CAYAAACMwORRAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4wLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvpW3flQAAF1RJREFUeJzt3W+MXFd5x/Hv490UMBAikVWJ4j+r\nCkRbUAjxKoSmQiFrqhAs8wKqplpKg1q5eEMJLRV/GilVLSFUIVGgYKMlqE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udj16R/OR8/AOrhpr3AX3X6uMO6oR6/iUzuVF/6vdfMjgOfB640s8PrG7j7E+7+bP32\nM8Cu0YY4OHd/tP75GNWY36VtTU4C6/9Hsg14dDTRDaZX39z9aXd/pn59B3COmZ0/8kD7cxI46e53\n1+9vo0qG7W2yPHY06F/mx2/VG4F73P0/OnwW/fhNZHJ39w+6+zZ3n6X6b9PX3f1t69u0jX/tpbrx\nmg0ze76ZvXD1NfArwPfbmt0OvL2+c38Z8JS7/2TEoQZr0jcze4mZWf36Uqpz/YlRx9oPd/934GEz\ne3m9ah74QVuzLI8dNOtfzsdvnV+n85AMjOD4TXq1TAszOwAsu/vtwLvNbC9wGngSuHacsfXhZ4Ev\n138/poG/cPevmdk7Adz908AdwNXAg8Ap4B1jijVUk769FdhvZqeB/wGu8bye2Ptd4Ej9X/sfA+8o\n5Nit6tW/rI+fmW0F3gD8zrp1Iz1+ekJVRKRAEzksIyJSOiV3EZECKbmLiBRIyV1EpEBK7iIiBVJy\nFxEpkJK7iEiBlNxFRAr0/2QbQ2Esc5otAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x113ab6f28>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.scatter(X[y == 0, 0], X[y == 0, 1], color='blue')\n",
    "plt.scatter(X[y == 1, 0], X[y == 1, 1], color = 'red')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "from sklearn.preprocessing import StandardScaler"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "standardScaler = StandardScaler()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "StandardScaler(copy=True, with_mean=True, with_std=True)"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "standardScaler.fit(X)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "X_standard = standardScaler.transform(X)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(100, 2)"
      ]
     },
     "execution_count": 26,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "X_standard.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "from sklearn.svm import LinearSVC"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "svc = LinearSVC(C=1e9)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "LinearSVC(C=1000000000.0, class_weight=None, dual=True, fit_intercept=True,\n",
       "     intercept_scaling=1, loss='squared_hinge', max_iter=1000,\n",
       "     multi_class='ovr', penalty='l2', random_state=None, tol=0.0001,\n",
       "     verbose=0)"
      ]
     },
     "execution_count": 36,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "svc.fit(X_standard, y)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "def plot_decision_boundary(model, axis):\n",
    "    \n",
    "    x0, x1 = np.meshgrid(\n",
    "        np.linspace(axis[0], axis[1], int((axis[1] - axis[0]) * 100)).reshape(-1, 1),\n",
    "        np.linspace(axis[2], axis[3], int((axis[3] - axis[2]) * 100)).reshape(-1, 1)\n",
    "    )\n",
    "    X_new = np.c_[x0.ravel(), x1.ravel()]\n",
    "    \n",
    "    y_predict = model.predict(X_new)\n",
    "    zz = y_predict.reshape(x0.shape)\n",
    "    \n",
    "    from matplotlib.colors import ListedColormap\n",
    "    custom_cmap = ListedColormap(['#EF9A9A', '#FFF59D', '#90CAF9'])\n",
    "    \n",
    "    plt.contourf(x0, x1, zz, linewidth=5, cmap=custom_cmap)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/Users/Winter/anaconda3/lib/python3.6/site-packages/matplotlib/contour.py:967: UserWarning: The following kwargs were not used by contour: 'linewidth'\n",
      "  s)\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXYAAAD8CAYAAABjAo9vAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4wLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvpW3flQAAGPJJREFUeJzt3X9sXeV5B/Dvk+vUscJNLI+wZHZQ\nOpUiEAmJFkWbmMa2ZlsWVYWKVCrKRkQnWZPWDNRVsM4SVZkidSChVVmlNVphQWL9maJWbaZCNEoH\nGoQfhYQ0EKFKI04DCbMgDjUptp/94Xuda+fa59x7nvP+Ot+PFKm+3Lz3ed3wzeWcr98rqgoiIkrH\nEt8DEBGRLQY7EVFiGOxERIlhsBMRJYbBTkSUGAY7EVFiCge7iCwTkcMi8rKIHBORL1kMRkRE3ZGi\nPXYREQDLVfW8iCwF8BSAO1T1GYsBiYioMz1FF9CZvxnON75c2vjFn3oiIvKkcLADgIjUALwA4CMA\nvqqqz7Z5zjCAYQBY3tv7O1etXm3x0kQUmdoAcGbiN3yPEaWTr774tqquynpe4UsxcxYT6QfwKIDd\nqvrKQs/btG6dPjEyYva6RBSH/p01fOXYX/geI1p3bul9QVU3Zz3PtBWjqu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+Z7D2BYA\nr6vqL1T11wC+CeAmzzOZUdWfAhjzPUdZVPW0qr7Y+N/jAI4DGPQ7lQ2dcb7x5dLGr0Xz0us1dhHZ\nIyInAexEugeIfQbAf/oegjINAjjZ8vUoEgmGqhGRdQA2AXjW7yR2RKQmIi8BOAPgcVVddG+lBruI\nHBKRV9r8ugkAVHVEVdcCeATAZ8ucxVrW3hrPGQEwiZn9RSXP/hIjbR5L5r8iq0JELgNwAMCd864K\nRE1Vpxqn6A4B2CIii15OK/oDSlnDJHscQdbeRGQXgI8D+JhG+MMCHfx/l4pRAGtbvh4C8EtPs1AX\nGtefDwB4RFW/53ueMqjqOyLyEwDbsMhBij5bMckeRyAi2wDcDeATqvor3/NQLs8BuEpEPiwiHwLw\naQA/8DwT5dS4wfh1AMdV9QHf81gSkVXNZp2I9AHYioy89NmKOQBgznEEqnrKyzDGROR1AL0A/q/x\n0DOpNH4AQEQ+CWAvgFUA3gHwkqr+md+pihOR7QD+GUANwIOqusfzSGZE5BsA/hAzx9q+BeCLqvp1\nr0MZEpHfB/DfAI5iJlMA4B9U9aC/qWyIyAYA+zHz53IJgG+r6r2L/p4IrxIQEdEi+JOnRESJYbAT\nESWGwU5ElBgGOxFRYhjsRESJYbATESWGwU5ElJj/B25GRWzj96cxAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x11639e0f0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plot_decision_boundary(svc, axis=[-3, 3, -3, 3])\n",
    "plt.scatter(X_standard[y == 0, 0], X_standard[y == 0, 1])\n",
    "plt.scatter(X_standard[y == 1, 0], X_standard[y == 1, 1])\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[ 4.03241395, -2.49297103]])"
      ]
     },
     "execution_count": 44,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "svc.coef_"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([ 0.95367935])"
      ]
     },
     "execution_count": 45,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "svc.intercept_"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 65,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "svc2 = LinearSVC(C=0.00000001)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 66,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "LinearSVC(C=0.1, class_weight=None, dual=True, fit_intercept=True,\n",
       "     intercept_scaling=1, loss='squared_hinge', max_iter=1000,\n",
       "     multi_class='ovr', penalty='l2', random_state=None, tol=0.0001,\n",
       "     verbose=0)"
      ]
     },
     "execution_count": 66,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "svc2.fit(X_standard, y)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 67,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[ 0.90283249, -0.74145043]])"
      ]
     },
     "execution_count": 67,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "svc2.coef_"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 68,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([ 0.09386739])"
      ]
     },
     "execution_count": 68,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "svc2.intercept_"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 69,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/Users/Winter/anaconda3/lib/python3.6/site-packages/matplotlib/contour.py:967: UserWarning: The following kwargs were not used by contour: 'linewidth'\n",
      "  s)\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXYAAAD8CAYAAABjAo9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wEdV\n9Ze+66FcngVwqYh8UER+DcDHAfyn55oop8YNxq8BOKqq9/mux5KIXNRM1olIN4CtyOiXPlMx+wDM\nOY5AVU94KcaYiLwGoAvALxqXnk4l8QMAIvIxAA8AuAjA2wBeVNU/9VtVcSJyHYB/AlAD8KCq7vZc\nkhkR+TqAP8T0sbZvAvi8qn7Na1GGROT3APwvgMOY7ikA8DlV3e+vKhsisgHAHkx/X3YA+Kaq3rPo\n74lwl4CIiBbBT54SESWGjZ2IKDFs7EREiWFjJyJKDBs7EVFi2NiJiBLDxk5ElJj/B4sxc03TAPh1\nAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x1a1fa8c898>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plot_decision_boundary(svc2, axis = [-3, 3, -3, 3])\n",
    "plt.scatter(X_standard[y == 0, 0], X_standard[y == 0, 1])\n",
    "plt.scatter(X_standard[y == 1, 0], X_standard[y == 1, 1])\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
